package nicg.st.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import nicg.st.service.RealTimeService;

@RestController
@RequestMapping("/api/realtime")
public class RealTimeController {

	@Autowired
	RealTimeService realTimeService;
	
	@RequestMapping(value = "/getSchemeHist", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public String getSchemeHist(String rwnm) {
        return realTimeService.getSchemeHist(rwnm);
    }
	
	@RequestMapping(value = "/getNodeHist", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public String getNodeHist(String rwnm, String nodeName) {
        return realTimeService.getNodeHist(rwnm, nodeName);
        
    }
}
